#!/usr/bin/python
#coding:utf-8

import os
import redis
import base64
import datetime

class Connecter(object):
    def connect_to_redis(self):
        conn=redis.StrictRedis(host='localhost',port='6179',db='0')#链接redis数据库
        return conn

    def price_to_redis(self,conn,price):#将价格信息redis数据库
        date=datetime.datetime.now().strftime('%Y-%m-%d')
        conn.set(date, price)
